<%@ taglib uri="/struts-tags" prefix="s" %>
<html>
<head>
<script type="text/javascript">
var saveCompany = function(){
	$.ajax({
		url : 'addCopCompany', // action to be perform
		dataType : 'html',
		data : {
			knKey : $("#knKey").val(),
			companyName : $("#companyName").val(),
		},
		success : function(html) {
			$('#contenidoInformacion').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
};
</script>
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="frameCompanies">
				<div id="compBox">
					<div class="form-group">
						<label for="exampleInputEmail1">KnKey:</label> <input
							type="text" class="form-control" id="knKey"
							placeholder="Enter KnKey">
						<label for="exampleInputEmail1">Company Name:</label> <input
							type="text" class="form-control" id="companyName"
							placeholder="Enter Name">
					</div>				
					<button type="submit" class="btn btn-default" onclick="saveCompany()">Add</button>		
				</div>
			</div>
		</div>
	</div>
</body>
</html>